package lms.dwr.demo.dao;

import lms.dwr.demo.common.DAOException;
import lms.dwr.demo.model.ModelUser;

/**
 * The account repository 
 * 
 * @author Jeccy.Zhao
 *
 */
public interface DAOUser extends DAOBase<ModelUser>
{
	
	/**
	 * Obtains account entity with account name and password
	 * 
	 * @param userName
	 *           the account name
	 * @param password
	 *           the account password
	 * @return account entity model
	 * @throws DAOException
	 */
	ModelUser getAccountByNameAndPwd(String userName,
			String password) throws DAOException;
	
	/**
	 * Obtains account entity with account name 
	 * 
	 * @param userName
	 *           the account name
	 * @return account entity model
	 * @throws DAOException
	 */
	ModelUser getAccountByName(String userName) 
			throws DAOException;
	
}
